<template>
    <div class="logo">
        <img :src="Logo" style="width: 34px; height: 34px;" alt="">
        <h1>动力港</h1>
    </div>
    <!-- $route.path要跟index绑定在一起 -->
    <el-menu :router="true" :default-active="$route.path">
        <MenuList v-for="item in menulist" :key="item.url" :item="item"></MenuList>
    </el-menu>
</template>


<script lang="ts" setup>
import Logo from '@/assets/logo.png'
import MenuList from '@/components/NavMenu/MenuList.vue'
import { useUserStore } from '@/store/auth';
const UserStore =useUserStore()
const menulist = UserStore.menu


</script>


<style lang="less" scoped>
.logo{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 10px 0;
    margin-left: -10px;
    h1{
        font-size: 22px;
        margin-left: 10px;
        color: #222;
    }
}

</style>